package  com.game.raceroom.player.item	
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Loader;
	import flash.events.Event;
	import flash.net.URLRequest;
	
	import com.util.DEF;
	import com.game.main.UserInfoCanvas;
	
	public class BaseItem
	{
		
		public var itype:int;
		public var iid:int;
		public var iqtt:int;
		public var idesc:String;
		public var iname:String;
		public var ipile:int=1;
		public var iprice:int;
		public var iuse:int=0;
		public var onSale:Boolean=false;
		public var sale:int=1;
		public var index:int=0;//背包索引
		public function BaseItem()
		{
		}
		public function getBuyValue():int{
			return iqtt*iprice;
		}
		public function getSellValue():int{
			return iqtt*iprice/2;
		}
		public function clone():BaseItem{
			var item:BaseItem=new BaseItem;
			item.itype=itype;
			item.iid=iid;
			item.iqtt=iqtt;
			item.idesc=idesc;
			item.iname=iname;
			item.ipile=ipile;
			item.iprice=iprice;
			item.iuse=iuse;
			item.sale=sale;
			item.index=index;
			return item;
		}
	}
}